import * as sdk from './fetch';
const controllerName = 'UserCenterController';

/**
 *
 * 活动列表
 *
 */
async function findByRegisterBy(params): Promise<BaseResponseString> {
  let result = await sdk.rzpost('activity/findByRegisterBy', {
    ...params,
  });
  return result;
}

/**
 *
 * 活动类型
 *
 */
async function getActiveType(): Promise<BaseResponseString> {
  let result = await sdk.rzpost('activity/findActivityType', {});
  return result;
}
/**
 *
 * 我的发布
 *
 */
async function findMyPublishForum(params): Promise<BaseResponseString> {
  let result = await sdk.rzpost('forum/findMyPublishForum', {
    ...params,
  });
  return result;
}
/**
 *
 * 我的点赞
 *
 */
async function findMyThumbForum(params): Promise<BaseResponseString> {
  let result = await sdk.rzpost('forum/findMyThumbForum', {
    ...params,
  });
  return result;
}
/**
 *
 * 我的评论
 *
 */
async function findMyCommentForum(params): Promise<BaseResponseString> {
  let result = await sdk.rzpost('forum/findMyCommentForum', {
    ...params,
  });
  return result;
}

/**
 *
 *删除帖子
 *
 */
async function deleteForum(params): Promise<BaseResponseString> {
  let result = await sdk.rzpost('forum/delete', {
    ...params,
  });
  return result;
}
/**
 *
 *删除评论
 *
 */
async function deleteComment(params): Promise<BaseResponseString> {
  let result = await sdk.rzpost('forum/deleteComment', {
    ...params,
  });
  return result;
}
/**
 *
 *新增建议反馈
 *
 */
async function addFeedback(params): Promise<BaseResponseString> {
  let result = await sdk.rzpost('apiUserFeedback/addFeedback', {
    ...params,
  });
  return result;
}
/**
 *
 *建议反馈
 *
 */
async function feedbackList(params): Promise<BaseResponseString> {
  let result = await sdk.rzget(`apiUserFeedback/findList?userId=${params.userId}&pageNum=${params.pageNum}`, {});
  return result;
}

export default {
  findByRegisterBy,
  getActiveType,
  findMyPublishForum,
  findMyThumbForum,
  findMyCommentForum,
  deleteForum,
  deleteComment,
  addFeedback,
  feedbackList,
};

/**
 * 内容
 *
 * This interface was referenced by `IgnoreType`'s JSON-Schema
 * via the `definition` "undefined".
 */
export type Undefined = string;

export interface IgnoreType {
  [k: string]: any;
}
/**
 * This interface was referenced by `IgnoreType`'s JSON-Schema
 * via the `definition` "BaseResponse«CustomerPointsExpireResponse»".
 */
export interface BaseResponseCustomerPointsExpireResponse {
  /**
   * 结果码
   */
  code: string;
  context?: CustomerPointsExpireResponse;
  /**
   * 错误内容
   */
  errorData?: {
    [k: string]: any;
  };
  /**
   * 消息内容
   */
  message?: string;
  [k: string]: any;
}
/**
 * 内容
 */
export interface CustomerPointsExpireResponse {
  /**
   * 客户ID
   */
  customerId?: string;
  /**
   * 积分过期时间
   */
  pointsExpireDate?: string;
  /**
   * 积分过期开关
   * * DISABLE: 未启用
   * * ENABLE: 已启用
   */
  pointsExpireStatus?: 0 | 1;
  /**
   * 即将过期积分数
   */
  willExpirePoints?: number;
  [k: string]: any;
}
/**
 * This interface was referenced by `IgnoreType`'s JSON-Schema
 * via the `definition` "BaseResponse«string»".
 */
export interface BaseResponseString {
  /**
   * 结果码
   */
  code: string;
  /**
   * 内容
   */
  context?: string;
  /**
   * 错误内容
   */
  errorData?: {
    [k: string]: any;
  };
  /**
   * 消息内容
   */
  message?: string;
  [k: string]: any;
}

//create by moon https://github.com/creasy2010/moon
